package com.ruoyi.dynamic.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.pojo.result.Pages;
import com.ruoyi.dynamic.model.pojo.entity.Gift;
import com.ruoyi.dynamic.model.pojo.entity.RoomVote;
import com.ruoyi.dynamic.model.pojo.request.app.AppRoomHeartGetRequest;
import com.ruoyi.dynamic.model.pojo.request.app.AppRoomVoteAddRequest;
import com.ruoyi.dynamic.model.pojo.request.app.AppRoomVoteGiveRequest;
import com.ruoyi.dynamic.model.pojo.request.app.AppRoomVoteSearchRequest;
import com.ruoyi.dynamic.model.pojo.result.app.AppRoomVoteInfoResult;

import java.util.List;

/**
 * <p>
 * 房间投票 服务类
 * </p>
 *
 * @author Gnc
 * @since 2025-01-02
 */
public interface IRoomVoteService extends IService<RoomVote> {

    /**
     * 发起礼物投票
     */
    AppRoomVoteInfoResult add(AppRoomVoteAddRequest request, Long userId);

    /**
     * 结束礼物投票
     */
    boolean over(AppRoomHeartGetRequest request, Long userId);

    /**
     * 校验
     */
    RoomVote verify(Long id);

    /**
     * 礼物投票
     */
    boolean giveVote(AppRoomVoteGiveRequest request, Long userId);

    /**
     * 结束投票公共封装的方法
     */
    void overVote(RoomVote roomVote, Integer feng);

    /**
     * 房间本场投票记录
     */
    Pages<RoomVote> listPage(AppRoomVoteSearchRequest request, Long userId);

    /**
     * 当前投票详情
     */
    AppRoomVoteInfoResult info(Long id);

    /**
     * 换一换礼物
     * @param number
     */
    List<Gift> cutGift(Integer number);


}
